package com.devteam.weather;

import com.devteam.weatherforcecast.WeatherUtils;

/**
 * Các thông tin trong thẻ <current_conditions> mà trang GG API nó trả về
 * 
 *  === T H O I     T I E T     C U A     N G A Y     H I E N     T A I ===     
 *  Condition : trạng thái
 */
public class WeatherCurrentCondition {



	private String ngayCuaTuan = null; 
	private Integer nhietDoC = null;          //  <temp_c.......  
	private Integer nhietDoF = null;          //  <temp_f......
	private String linkIcon = null;           //  <icon...
	private String tinhTrang = null;          //  <condition.....  1,609344 km/h
	private String tinhTrangGio = null;       //  <wind_condition.....
	private String doAm = null;               //  <humidity......

	public WeatherCurrentCondition() {

	}
	
	public WeatherCurrentCondition(String ngayCuaTuan, Integer nhietDoC,
			Integer nhietDoF, String linkIcon, String tinhTrang,
			String tinhTrangGio, String doAm) {
		this.ngayCuaTuan = ngayCuaTuan;
		this.nhietDoC = nhietDoC;
		this.nhietDoF = nhietDoF;
		this.linkIcon = linkIcon;
		this.tinhTrang = tinhTrang;
		this.tinhTrangGio = tinhTrangGio;
		this.doAm = doAm;
	}

	public String getNgayCuaTuan() {
		return ngayCuaTuan;
	}

	public void setNgayCuaTuan(String ngayCuaTuan) {
		this.ngayCuaTuan = ngayCuaTuan;
	}

	public Integer getNhietDoC() {
		return nhietDoC;
	}

	public void setNhietDoC(Integer nhietDoC) {
		this.nhietDoC = nhietDoC;
	}

	public Integer getNhietDoF() {
		return nhietDoF;
	}

	public void setNhietDoF(Integer nhietDoF) {
		this.nhietDoF = nhietDoF;
	}

	public String getLinkIcon() {
		return linkIcon;
	}

	public void setLinkIcon(String linkIcon) {
		this.linkIcon = linkIcon;
	}

	public String getTinhTrang() {
		
			return tinhTrang;
		
	}

	public void setTinhTrang(String tinhTrang) {
		this.tinhTrang = tinhTrang;
	}

	public String getTinhTrangGio() {
		String s = "";
		try {
			s = new WeatherUtils().parseWindCondition(tinhTrangGio);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return tinhTrangGio;
		}
		return s ;
	}

	public void setTinhTrangGio(String tinhTrangGio) {
		this.tinhTrangGio = tinhTrangGio;
	}

	public String getDoAm() {
		String s = "";
		try {
			s = new WeatherUtils().parseHumidity(doAm);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return doAm;
		}
		return s ;
	}

	public void setDoAm(String doAm) {
		this.doAm = doAm;
	}

	
}
